package cn.edu.sysu.service;

import java.sql.SQLException;
import java.util.List;

import cn.edu.sysu.dao.IssueDao;
import cn.edu.sysu.dao.UserDao;
import cn.edu.sysu.dto.IssueDto;
import cn.edu.sysu.dto.UserDto;
import cn.edu.sysu.util.Transaction;
import cn.edu.sysu.util.TransactionRead;

public class IssueService {

	IssueDao iDao = IssueDao.INSTANCE;

	Transaction read = TransactionRead.INSTANCE;

	public List<IssueDto> getIssueByProblem(int problemId) throws SQLException{
		List<IssueDto> issueList = iDao.getIssueByProblem(read, problemId);
		return issueList;
	}

	public List<IssueDto> getIssuesByProblemAndUser(int problem_id, int user_id){
		List<IssueDto> issueList = iDao.getIssueByProblemAndUser(read, problem_id, user_id);
		return issueList;
	}
}
